package com.example.snakefinal;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Point;

public class Apple extends Food {

    /// Set up the apple in the constructor
    Apple(Context context, Point location, int size) {

        // Make a note of the passed in spawn range
        this.mSpawnRange = location;
        this.mSize = size;
        // Hide the apple off-screen until the game starts
        this.value = 10;
        this.mBitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.apple);
        this.mBitmap = Bitmap.createScaledBitmap(this.mBitmap, size, size, false);
        this.spawn();
    }


    @Override
    public void applyMod(SnakeGame game, Snake snake) {
        snake.increaseScore(value);
    }
}